package cn.com.huzo.model.entities.trade;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 销售发票明细记录实体类
 *
 * @author 吴旭
 */
public class CommercialInvoiceLinesEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 2296878885406491009L;
    private String LinesId;
    private Long HeaderId;
    private Long ProductId;
    private String NoOfStyle;
    private String ProductName;
    private Long CustomerId;
    private String CustomerName;
    private Float Quantity;
    private Float UnitPrice;
    private Long CurrencyId;
    private String CurrencyName;
    private Long QuantityOfShipped;
    private String Destination;
    private Integer QuantityOfCase;
    private String ShippingMarkNo;
    private String NoOfContract;
    private Float GrossWeight;
    private Float NetWeight;
    private Float Cubage;
    private Timestamp DateOfDelivery;

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public Long getProductId() {
        return ProductId;
    }

    public void setProductId(Long ProductId) {
        this.ProductId = ProductId;
    }

    public String getNoOfStyle() {
        return NoOfStyle;
    }

    public void setNoOfStyle(String NoOfStyle) {
        this.NoOfStyle = NoOfStyle;
    }

    public String getProductName() {
        return ProductName;
    }

    public void setProductName(String ProductName) {
        this.ProductName = ProductName;
    }

    public Long getCustomerId() {
        return CustomerId;
    }

    public void setCustomerId(Long CustomerId) {
        this.CustomerId = CustomerId;
    }

    public String getCustomerName() {
        return CustomerName;
    }

    public void setCustomerName(String CustomerName) {
        this.CustomerName = CustomerName;
    }

    public Float getQuantity() {
        return Quantity;
    }

    public void setQuantity(Float Quantity) {
        this.Quantity = Quantity;
    }

    public Float getUnitPrice() {
        return UnitPrice;
    }

    public void setUnitPrice(Float UnitPrice) {
        this.UnitPrice = UnitPrice;
    }

    public Long getCurrencyId() {
        return CurrencyId;
    }

    public void setCurrencyId(Long CurrencyId) {
        this.CurrencyId = CurrencyId;
    }

    public String getCurrencyName() {
        return CurrencyName;
    }

    public void setCurrencyName(String CurrencyName) {
        this.CurrencyName = CurrencyName;
    }

    public Long getQuantityOfShipped() {
        return QuantityOfShipped;
    }

    public void setQuantityOfShipped(Long QuantityOfShipped) {
        this.QuantityOfShipped = QuantityOfShipped;
    }

    public String getDestination() {
        return Destination;
    }

    public void setDestination(String Destination) {
        this.Destination = Destination;
    }

    public Integer getQuantityOfCase() {
        return QuantityOfCase;
    }

    public void setQuantityOfCase(Integer QuantityOfCase) {
        this.QuantityOfCase = QuantityOfCase;
    }

    public String getShippingMarkNo() {
        return ShippingMarkNo;
    }

    public void setShippingMarkNo(String ShippingMarkNo) {
        this.ShippingMarkNo = ShippingMarkNo;
    }

    public String getNoOfContract() {
        return NoOfContract;
    }

    public void setNoOfContract(String NoOfContract) {
        this.NoOfContract = NoOfContract;
    }

    public Float getGrossWeight() {
        return GrossWeight;
    }

    public void setGrossWeight(Float GrossWeight) {
        this.GrossWeight = GrossWeight;
    }

    public Float getNetWeight() {
        return NetWeight;
    }

    public void setNetWeight(Float NetWeight) {
        this.NetWeight = NetWeight;
    }

    public Float getCubage() {
        return Cubage;
    }

    public void setCubage(Float Cubage) {
        this.Cubage = Cubage;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDateOfDelivery() {
        return DateOfDelivery;
    }

    public void setDateOfDelivery(Timestamp DateOfDelivery) {
        this.DateOfDelivery = DateOfDelivery;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof CommercialInvoiceLinesEntity)) {
            return false;
        }

        final CommercialInvoiceLinesEntity that = (CommercialInvoiceLinesEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
